package com.mjlf.cloud.feignconsumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;

@EnableDiscoveryClient
//声明这是一个服务
@EnableFeignClients
//表示这是一个Feign服务
@SpringBootApplication
@EnableHystrix	//或者是@EnableCircuitBreaker
//开启hystrix容错，可以使用/hystrix.stream端点监看接口的调用情况
@EnableHystrixDashboard
//开启hystrix监控界面
//界面地址：http://localhost:port/hystrix
public class FeignconsumerApplication {

	public static void main(String[] args) {
		SpringApplication.run(FeignconsumerApplication.class, args);
	}
}


/**
 * 短路监控器
 <dependency>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-actuator</artifactId>
 </dependency>

 hystrix 监控
 <dependency>
 <groupId>org.springframework.cloud</groupId>
 <artifactId>spring-cloud-starter-hystrix</artifactId>
 </dependency>

 界面监控
 <dependency>
 <groupId>org.springframework.cloud</groupId>
 <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
 </dependency>

 聚合监控
 <dependency>
 <groupId>org.springframework.cloud</groupId>
 <artifactId>spring-cloud-starter-turbine</artifactId>
 </dependency>

 */